package two_xia.ex9.Demo08;

class GameRole {
    private LevelState levelState;

    public GameRole() {
        // 初始状态为入门级
        levelState = new PrimaryState(this);
    }

    // 设置状态
    public void setLevelState(LevelState levelState) {
        this.levelState = levelState;
    }

    // 玩游戏
    public void play() {
        levelState.play();
    }

    // 积分加倍
    public void doubleScore() {
        levelState.doubleScore();
    }

    // 换牌
    public void changeCards() {
        levelState.changeCards();
    }

    // 偷看他人的牌
    public void peekCards() {
        levelState.peekCards();
    }
}